﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MS.InformationManagement.DAL.DocumentCenter;
using Microsoft.SharePoint;

namespace MS.InformationManagement.BLL.IncommingDocuments
{
    public class IncommingDocuments
    {
        public static IEnumerable<RadicadoEntrante> GetAllIncommingDocuments()
        {
            using (var dc = new DCDocumentCenterDataContext(SPContext.Current.Web.Url))
            {
                var incomingDocuments = (from document in dc.RadicadosEntrantes
                                         orderby document.Created descending
                                         select document);
                return incomingDocuments;
            }
        }
    }
}
